{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print('第一个_gt_')\n",
    "def __gt__(a,b):\n",
    "    return a>b\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print('第二个_ne_')\n",
    "def __ne__(a,b):\n",
    "    return a=b\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print('第三个add_numbers')\n",
    "def add_numbers(num1,num2):\n",
    "    return num1+num2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print('第四个concatenate_lists')\n",
    "def concatenate_lists(lst1,lst2):\n",
    "return lst1+lst2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print('第五个subtract_numbers')\n",
    "def subtract_numbers(a,b):\n",
    "return a-b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print('第六个greet')\n",
    "def greet(name):\n",
    "    return"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print('第七个sum_values')\n",
    "def sum_values(dictionary):\n",
    "    return sum(dictionary.values())\n",
    "\n",
    "my_dict = {\"a\": 1, \"b\": 2, \"c\": 3}\n",
    "total_sum = sum_values(my_dict)\n",
    "print(total_sum) \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print('第八个add_item')\n",
    "def add_item(dictionary, key, value):\n",
    "    dictionary[key] = value\n",
    "\n",
    "add_item(my_dict, \"d\", 4)\n",
    "print(my_dict)  \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print('第九个get_length')\n",
    "def get_length(dictionary):\n",
    "    return len(dictionary)\n",
    "\n",
    "length = get_length(my_dict)\n",
    "print(length)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print('第十个clear_dict')\n",
    "def clear_dict(dictionary):\n",
    "    dictionary.clear()\n",
    "\n",
    "clear_dict(my_dict)\n",
    "print(my_dict)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print('第十一个first_key')\\\n",
    "    def first_key(dictionary):\n",
    "        return next(iter(dictionary))\n",
    "\n",
    "first_key_val = first_key(my_dict)\n",
    "print(first_key_val) \n"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
